home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1997 February / JCSM Shareware Collection February 1997 Best of (JCS Marketing)(February 1997).bin / PRGTOOLS / PREXCM60.ZIP / PROTEXCM.DOC < prev    next >
Text File  |  1996-08-17  |  23KB  |  601 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                         Protect! EXE/COM v6.0
  7.                     Executable Encryption Package
  8.                      (C) 1993-1996 Jeremy Lilley, 
  9.                           All Rights Reserved
  10.  
  11.                              August, 1996
  12.  
  13.  
  14.                         Program Documentation
  15.                         =====================
  16.  
  17.  
  18.  
  19. Contents:
  20. ---------
  21.  
  22. What's Protect! v6.0 ? ......................... 1
  23. Requirements ................................... 2
  24. How To Use Protect! EXE/COM .................... 3
  25. The ProtExCm.INI File........................... 3
  26. Which Files Can't Be Protected ................. 4
  27. Legal Terms / Disclaimer ....................... 5
  28. License ........................................ 6
  29. Philosophy behind Protect! ..................... 6
  30. Comments on Hacking Protect! ................... 7
  31. Technical Notes ................................ 7
  32. Compression Notes .............................. 8
  33. What's The Mutation Engine? .................... 8
  34. Closing ........................................10
  35. Address ........................................10
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. What is Protect! EXE/COM v6.0 ?
  44. -------------------------------
  45.  
  46.  
  47.     Protect! EXE/COM is an encryption and compression utility that 
  48. has been preventing modification, hacking, and reverse-engineering 
  49. in programs for the last three years. While the changes made to the 
  50. files are invisible to the end-user, Protect adds some powerful 
  51. features for program authors:
  52.  
  53.         * Modification Check --  prevents a corrupted or hacked copy
  54.         of the file from running, giving your customized message to 
  55.         the end user. View the modification message with ModMsg.EXE!
  56.  
  57.         * File Serialization and Source Tracking - would you like to 
  58.         know which copies pirated or hacked programs are coming from ? 
  59.         With the SERIALIZE option, you can automatically embed an 
  60.         encrypted number or string, to be displayed with the 
  61.         modification message and viewed with ModMsg.EXE.
  62.  
  63.  
  64.                                                                 Page 2
  65.  
  66.  
  67.  
  68.  
  69.         * Anti-debugging Traps and a Custom Mutation Engine - make it 
  70.         difficult to trace through Protected files or to for hackers 
  71.         to write "auto-crack" files to target your programs.
  72.  
  73.         * Differentiation in the Registered Code: The files produced 
  74.         by the registered version are different from the unregistered 
  75.         version to improve security of the registered version.
  76.  
  77.         * Customizability - Now a number of options are available in 
  78.         the ProtExCm.INI file to tune Protect better to your needs.
  79.  
  80.         * Passwords - You can now optionally add a password to files
  81.         for extra security, and registered users can change the text 
  82.         of the prompt.
  83.  
  84.         * Executable Compression - Protect automatically attempts to 
  85.         compress your files (unless disabled), but it also works great 
  86.         with compressor programs such as PKLite (R) and LZEXE.
  87.  
  88.         * Speed and Compatibility - Protect is written in heavily 
  89.         optimized assembly language and has been tried and tested for 
  90.         the last three years. Protect is tested from 8088 to Pentium, 
  91.         under DOS, Windows (3.1, 95, NT), and OS/2.
  92.  
  93.  
  94.     The customizability options are the most new in Protect, 
  95. allowing various security features to be turned on and off. 
  96. Optional passwords and file serialization and tracking are also new 
  97. with this version, in addition to some security updates and minor 
  98. bug fixes.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. Requirements
  106. ------------
  107.  
  108.  
  109.     Protect will run on just about any PC available today. 
  110. Protected files require about 1.8k more memory than their 
  111. unProtected counterparts, but, besides this, they should run the 
  112. same as normal, under DOS, Windows (3.1, 95, NT), and OS/2.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.                                                                 Page 3
  120.  
  121.  
  122.  
  123. How To Use Protect! EXE/COM
  124. ---------------------------
  125.  
  126.  
  127.     Much of the control for Protect! has been delegated to the 
  128. ProtExCm.INI file, but the command-line syntax for ProtExCm.INI is:
  129.  
  130.  
  131.  
  132.  
  133.         ProtExCm MyProg[.EXE/COM] Protexcm.INI
  134.  
  135.  
  136.     The filename must be a DOS EXE or COM file.
  137.  
  138.         The ProtExCm.INI file (or the MyProg.INI, etc. file) holds
  139. some setup information for Protect, with which you can use the
  140. password, serialization, registered modification message, and
  141. other features. If no INI file is specified, PROTEXCM.INI is used,
  142. or if there is an INI file with the same file name as the EXE or
  143. COM file, it will be used.
  144.  
  145.         The capabilities previously available instead of the INI
  146. file, which were turning off compression, and, for registered users,
  147. customizing the modification message, have both been placed in the
  148. ProtExCm.INI file (as "No Compress" and "CRC Message File").
  149.  
  150.  
  151.         Here is an example:
  152.  
  153.         ProtExCm MyProg
  154.                 (To Protect MyProg.EXE or MyProg.COM, using MyProg.INI
  155.                 or ProtExCm.INI as the configuration file)
  156.  
  157.  
  158.  
  159.     It is possible to apply Protect to a file multiple times, but 
  160. after too many layers, there will be noticeable loading delays and 
  161. perhaps errors.
  162.  
  163.     For obvious reasons, no "unProtect" program is provided with 
  164. the Protect! package. A backup file with the ".OLD" extension will 
  165. be produced, however. 
  166.  
  167.  
  168.  
  169.  
  170. The ProtExCm.INI File (a.k.a. MyProg.INI or MyFile.INI...)
  171. ---------------------
  172.  
  173.  
  174.     This file, which must be in the current directory, lets you 
  175. specify defaults for Protect's behavior. The default, which 
  176. includes everything commented out, will work well in most cases, 
  177. but you may want to "tweak" things for your files. 
  178.  
  179.         If the file you are Protecting has a corresponding INI file,
  180.  
  181.  
  182.                                                                 Page 4
  183.  
  184.  
  185.  
  186. that file will be used in place of ProtExCm.INI. For example, when
  187. Protecting MyProg.EXE, a MyProg.INI will be looked for, and so on.
  188. The options are listed below:
  189.  
  190.  
  191.     No Compress : Protect normally attempts to compress files 
  192.                 before encrypting them. Use this if you would like to
  193.          disable compression, especially if you are already using 
  194.                 PKLite or LZEXE. 
  195.  
  196.     No UnAV : Since Protect is written to prevent disassembly,
  197.         sometimes anti-virus scanners confuse Protected programs
  198.         as being infected with a virus. Normally, Protect adds
  199.         code to minimize this. Use No UnAV to disable this. 
  200.  
  201.     Password : To require the user to enter a password to decrypt
  202.         and run the program, add a line saying "Password" to this
  203.         file and below this line, add the name of a file with the 
  204.                 text of the password. Only the first 50 bytes are read.
  205.  
  206.     Serialize : To add a number or string of up to 50 characters 
  207.         to be displayed when the file is modified, use this 
  208.         option. Add "serialize" to ProtExCm.INI and the name of a
  209.         file containing the serial number below it (Protect will 
  210.         create this file if necessary). 
  211.  
  212.         If the text in the serial number file is numeric, Protect 
  213.         will increment that and use that number. You can view the
  214.         serial number with the ModMsg.EXE utility.
  215.  
  216.  
  217. Registered-only options:
  218.  
  219.         CRC Message File : You can customize the generic modification
  220.                 message outputted when your file is modified using
  221.                 this switch. Just put the name of a file (only 4k is
  222.                 read) under this line to use.
  223.  
  224.     No UnIntruder : There is a generic Borland C/Pascal hacking
  225.         program known as Intruder that Protect adds code to 
  226.         specifically combat in the registered version. To disable 
  227.         this unIntruder code, use this line.
  228.  
  229.     Password Message : If you're using the password option above 
  230.         and you want something different than "Password? " to 
  231.         greet the user, use this line and put the name of a file
  232.                 containing the prompt below it. Maximum 500 bytes.
  233.  
  234.     No Jmute : USE THIS SPARINGLY. It disables Protect's custom 
  235.         mutation engine as well as options like unIntruder and
  236.         unAV code.
  237.  
  238.  
  239.  
  240.  
  241.  
  242. Which Files Can't Be Protected
  243. ------------------------------
  244.  
  245.  
  246.     Protect! EXE/COM cannot Protect Windows and OS/2 EXE files 
  247. because the formats for these files are substantially different and 
  248. more complex than the regular DOS EXE format. 
  249.  
  250.  
  251.                                                                 Page 5
  252.  
  253.  
  254.  
  255.  
  256.     For your information, a Windows EXE starts out looking (from 
  257. Protect's perspective) like a small DOS EXE that can only display a 
  258. message that "This file requires Windows." There is a pointer to a 
  259. Windows New EXE header, which Windows finds and uses as the Windows 
  260. file. I have written a freeware program called EXE-Combine that 
  261. exploits this and allows you to attach a DOS program to a Windows 
  262. program. Protect! will now automatically detect if a file is for 
  263. Windows or OS/2 so that you don't waste your time trying to Protect 
  264. them. 
  265.  
  266.     Also, due to the structure of Protect! and the DOS memory 
  267. model, files larger than the 600k neighborhood can't be Protected 
  268. (because the entire file has to be able to fit in memory all at once 
  269. when it loads). This fact, of course, makes Protect! worthless for 
  270. many xBase files where the basic "Hello World" EXE can be over a 
  271. meg. There is no compelling reason to Protect files like 
  272. COMMAND.COM.
  273.  
  274.  
  275.  
  276.  
  277.  
  278. Legal Terms / Disclaimer
  279. ------------------------
  280.  
  281.  
  282.     The only guarantee behind Protect! EXE/COM v6.0 ("Protect!") 
  283. is that it has the ability to alter EXE and COM ("executable") 
  284. files. Due to the extensive number of possible executable files and 
  285. variety of computer systems, it is impossible for the author 
  286. (Jeremy Lilley) to guarantee Protect. Protect! is provided "as is," 
  287. and, as the user, you have been warned that using Protect! implies 
  288. that you understand that compatibility and other problems may 
  289. potentially arise. You, as the user, are responsible for any damage 
  290. caused by using or misusing Protect!, and under no circumstances 
  291. may the author be held liable for loss of profits or any other 
  292. damages arising from Protect. Also, it is your responsibility to 
  293. use Protect! only in a lawful manner.
  294.  
  295.     Risk of incompatibility and damage resulting from Protect! is 
  296. actually quite small -- I have optimized for maximum compatibility 
  297. in creating Protect and taken many precautions. However, if you try 
  298. to make it mess up, it probably will. Just remember that it isn't 
  299. my fault if you misuse my program.
  300.  
  301.     Also, all trademarks used are acknowledged to be property of 
  302. their respective owners.
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.                                                                 Page 6
  311.  
  312.  
  313.  
  314.  
  315. License
  316. -------
  317.  
  318.     You may use Protect! EXE/COM for the purposes of evaluating it 
  319. (after understanding the disclaimer and the documentation) for 30 
  320. days. No files protected by Protect! during this trial period may 
  321. be distributed to other users, commercially or non-commercially. If 
  322. you find Protect! to be of use to you, you must register Protect! 
  323. with the author, which is $25.
  324.  
  325.     Sysops, user groups, disk vendors, CD-ROM vendors and other 
  326. similar organizations may distribute Protect! provided that no 
  327. files are excluded from the distribution and that no more than $10 
  328. (except for CD-ROM) is charged for distribution. Protect! may not 
  329. be bundled with any commercial product without prior consent.
  330.  
  331.     Much of Protect!'s protection and encryption capability comes 
  332. from its anti-debugging and anti-hacking code. In order to keep 
  333. loading time to a minimum (yes, 1000-bit decryption keys *do* take 
  334. a while to process), the encryption key length is very little
  335. (some advanced math with 32-bit numbers) compared to the encryption 
  336. keys regulated for export from the US. In addition, since the 
  337. decryption mechanism is and needs to be located on the file, the 
  338. Protected files themselves are not subject to export restrictions, 
  339. except for nations that the U.S. has normal trade restrictions with.
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346. Philosophy behind Protect!
  347. --------------------------
  348.  
  349.  
  350.     Protect! started to fill a void a few years ago when there 
  351. were few EXE or COM utilities that could not be easily hacked 
  352. through. Even the PKLite program wasn't safe. While the first 
  353. versions of Protect! were rather inadequate for this void, Protect! 
  354. has been built up as a solid encryption program.
  355.  
  356.     While maximum security is part of the core ideal for Protect, 
  357. the most important factor is maximum compatibility. If a Protected 
  358. file can't run on the same target systems as its unProtected 
  359. counterpart, it would be rather useless. While this commitment to 
  360. making sure that Protect! runs under DOS-compatible operating 
  361. systems (DOS, Windows, Windows 95, Windows NT, OS/2) means that not 
  362. every anti-debugging technique can be used, it is much better this 
  363. way. This version, however, adds some flexibility with the 
  364. ProtExCm.INI file, so you can balance between security and speed.
  365.  
  366.     I won't critique other file encryption utilities, but I think 
  367. it is important to note that many other utilities either do not 
  368. implement the same level of security or employ some questionable 
  369. techniques to attain their level of security. Protect! is designed 
  370. to be as flexible and powerful as possible without sacrificing 
  371. compatibility. What's more, the registered version is different 
  372.  
  373.  
  374.                                                                 Page 7
  375.  
  376.  
  377.  
  378. enough that in the event that an unregistered crack is produced, it 
  379. should not work with the registered code.
  380.  
  381.  
  382.  
  383.  
  384.  
  385. Comments on Hacking Protect!
  386. ----------------------------
  387.  
  388.  
  389.     You may have seen master unProtect programs for old versions 
  390. of Protect. This, fortunately, is not the reason for this new 
  391. release (the registered version has stayed secure, which is where 
  392. my priority is). There have also been a number of people who have 
  393. plugged away at PROTEXCM.EXE long enough so that they can remove 
  394. the shell and change the message. With enough resources, breaking 
  395. through one specific file will be possible with any software-based 
  396. protection scheme.
  397.  
  398.     While Protect! v6.0 is not `hack-proof,' no program of its 
  399. nature can be. It does put together a very tough combination of 
  400. traps and encryption that very few people will be able to break. I 
  401. have tried to make Protect! v6.0 the most secure, least intrusive, 
  402. and most stable utility of its kind, and I think it comes close to 
  403. its goals.
  404.     
  405.  
  406.  
  407.  
  408.  
  409. Technical Notes
  410. ---------------
  411.  
  412.  
  413.     First of all, thank you to everyone who contributed ideas for 
  414. this version of Protect. A special thank you goes to John Meyers 
  415. for his help with combating the `Intruder' program when I had no 
  416. time to write a fix last term. A thank you also goes to Nathanael
  417. Weiss for encouraging me and constantly reminding me Who is utimately
  418. more important than any encryption program. Also, thank you to those
  419. who have beta-tested Protect, sent bug and virus reports, and passed
  420. Protect! to others.
  421.  
  422.     Most of the changes to this version have been less major 
  423. compared to previous releases, but there were many fixes and 
  424. additions that I wanted to release publicly. There are a few
  425. techniques such as pre-fetch queue traps (trying to write to a 
  426. memory location stored in a processor's instruction pre-fetch area, 
  427. which kills debuggers) and using 386 debugging registers to kill 
  428. debuggers like Soft-ICE that I have not used because they are 
  429. incompatible with some systems (like OS/2 -- which really helped in 
  430. writing Protect). I also found out that Windows (3.x, 95, NT) does 
  431. not work well with self-tracing (Int 1) code.
  432.  
  433.     Protect! v6.0 add a bit more than 1k to a file with an 
  434. average-sized modification error message, but it normally also 
  435.  
  436.  
  437.                                                                 Page 8
  438.  
  439.  
  440.  
  441. compresses. The mutation engine can vary the size somewhat, and 
  442. Protect! will usually be able to take a few hundred bytes from the 
  443. file header on EXE's. The encryption technique involves large 
  444. multiplication of the numbers by changing keys, not XOR. The 
  445. compression is a simple derivative of the Lempel-Ziv algorithm, but 
  446. it is nothing compared to the complexity of the compression used in 
  447. PKLite. You may layer multiple copies of Protect! on top of each 
  448. other, but that will start to cause noticeable delays in loading. 
  449.  
  450.     Protect! written entirely in assembly language (try writing a 
  451. mutation engine in a high level language!), mostly with the A86 
  452. assembler. My main machine for Protect! now is a Pentium 150, 
  453. running OS/2 for development and Windows 95 for applications. If 
  454. you have any suggestions, questions, comments, etc. about Protect!, 
  455. you can easily contact me through email, or if nothing else, postal 
  456. "snail mail" and I am usually pretty open to your comments.
  457.  
  458.  
  459.  
  460.  
  461.  
  462. Compression Notes
  463. -----------------
  464.  
  465.  
  466.     By default, Protect! tries to compress files before encrypting 
  467. them for both better security and smaller file sizes. Its algorithm 
  468. is derived from Lempel-Ziv, and it will go a long way toward 
  469. reducing redundancy in the underlying code. 
  470.  
  471.     Other compression programs like LZEXE or PKLite will in many 
  472. cases work better than Protect's native compression. If you have a 
  473. particularly large file or "too many relocation pointers" error 
  474. messages, I recommend trying an external compressor. There is a 
  475. small security trade-off to having another (known) compressor 
  476. underneath Protect, but for the most part, compression will help 
  477. with the resulting file
  478.  
  479.     You can opt not try attempt to compress a specific file by 
  480. putting a "-N" at the end of the command line or the NoCompress 
  481. option in the ProtExCm.INI file. You can save some time if you've 
  482. used another compressor already and know that it won't compress 
  483. under Protect. It also might be wise to do this if there is a 
  484. noticeable loading delay caused by Protect.
  485.  
  486.  
  487.  
  488.  
  489.  
  490. What's The Mutation Engine?
  491. ---------------------------
  492.  
  493.  
  494.     A portion of Protect! EXE/COM that is largely responsible for 
  495. keeping people from making master "auto-crack" unProtect programs 
  496. is the "mutation engine." It is basically the "front door" that 
  497.  
  498.  
  499.                                                                 Page 9
  500.  
  501.  
  502.  
  503. keeps unProtects out.
  504.  
  505.     Many utilities that can attach an envelope on an EXE (such
  506. as LZEXE or other file compression utilities) are the same every 
  507. time. That is why UNLZEXE or generic unprotect-type utilities are 
  508. relatively easy to make. When an unprotection utility (such as UNP) 
  509. unprotects a file, it creates a virtual-DOS environment for the 
  510. file to run in until the file finishes decrypting itself. When it 
  511. is done decrypting itself, the unprotect utility simply writes 
  512. what's in memory to disk and you have your unprotected file. The 
  513. program may use a different key every time and even encrypt itself, 
  514. but all the unprotect program has to do is just trace through that 
  515. until it gets to the original entry point, and it's written to disk 
  516. (plus some un-relocations and overhead, but.) 
  517.  
  518.     One of the tricks for foiling unprotection utilities and 
  519. debuggers lies is the fact that the unprotector must always have 
  520. control over the Protected program in order to stop it when it is 
  521. decrypted in memory. If you remove the unprotector's control and 
  522. subvert it without harming the operating system or other 
  523. concurrently-running applications, you are one step ahead in 
  524. protecting your programs. However, an unprotect program author can 
  525. just instruct his utility to detect the type of file and blank out 
  526. the bytes that would kill it when it gets to them. This would 
  527. result into a high-tech cat-and-mouse game.
  528.  
  529.     The reason that it isn't too difficult to make normal 
  530. unprotects stems from the fact that the protector's security 
  531. envelope is the *same every time*. I coded a mutation engine for 
  532. Protect! to make sure that the security envelopes wouldn't be the 
  533. same every single time a new one is encoded. Instead of being able 
  534. to "trace in" a definite number of bytes every time and being able 
  535. to blank out a certain number of bytes every time, these figures 
  536. will have to vary between each and every different file that is 
  537. Protected. If you get one original file and Protect on several 
  538. different occasions, it will never be the same length or have the 
  539. same content every time (there are thousands and thousands of 
  540. different combinations). My mutation engine randomly decides which 
  541. machine code instructions to use every time: it may use a 3 or 4 
  542. byte equivalent of a 2 byte instruction or vice-versa in any order 
  543. that works. Because there are definite rules for this mutation, it 
  544. will work every time. Since the mutated portion is relatively small 
  545. (but effective), an extra byte or two in a spot will not adversely 
  546. affect the performance of your Protected files. Garbage code and 
  547. other distractions make it even more difficult for a hacker to 
  548. write a master unProtect. Protect! uses both a mutation engine and 
  549. a variety of anti-debug tricks interspersed throughout to help 
  550. attain maximum security for your files.
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.                                                                 Page 10
  558. Closing
  559. -------
  560.  
  561.  
  562.  
  563.     Protect! EXE/COM can save you time, effort, energy, and money 
  564. in securing your files. There are no run-time fees or royalties for 
  565. Protect! EXE/COM; one $25 license is all that is required for 
  566. commercial use of Protect and distribution of Protected files. The 
  567. registered version will allow you to specify your own modification 
  568. error messages, change the password prompt, and it comes without 
  569. the "beg screen." 
  570.  
  571.     There is a definite threat of hackers and viruses on the loose 
  572. and it is your responsibility to protect your programs. Powerful 
  573. encryption, passwords prompting, serialization, and anti-debugging 
  574. help provide protection to your programs as they go into the real 
  575. world.
  576.  
  577.  
  578.     Thank you for evaluating Protect! EXE/COM!
  579.  
  580.  
  581.  
  582.  
  583.  
  584. Address
  585. -------
  586.  
  587.  
  588.                 Jeremy Lilley
  589.                 Protect! EXE/COM
  590.                 2711 Oak View Circle
  591.                 Medford, Oregon 97504
  592.                 Email: jjlilley@mit.edu  * CompuServe: 75060,2074
  593.                 URL: http://web.mit.edu/jjlilley/www/protect.html
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.